

function SetWinHeight(obj)
{
	var win=obj;
	if (document.getElementById)
	{
		if (win && !window.opera)
		{
			if (win.contentDocument && win.contentDocument.body.offsetHeight) 

				win.height = win.contentDocument.body.offsetHeight; 
			else if(win.Document && win.Document.body.scrollHeight)
				win.height = win.Document.body.scrollHeight;
		}
	}
}


function getClickNum(info_id){
		$.ajax({
			type: 'POST',
			url: '/templets/html/shop/jsp/updateNewsClickNum.jsp',
			data: 'info_id=' + info_id,
			cache: true,
			success: function(msg){
				document.getElementById("clicknum").innerHTML=msg;
			}
		});
}

function getnewscomment(info_id){
		$.ajax({
			type: 'POST',
			url: '/templets/html/shop/jsp/updateNewsnewscomment.jsp',
			data: 'info_id=' + info_id,
			cache: true,
			success: function(msg){
				document.getElementById("clicknum").innerHTML=msg;
			}
		});
}

function submitComment(){
	
	var s_user_id = document.getElementById('s_user_id').value;
	if( s_user_id == ''){
		$('#quickrebottom_error').html('请登录之后评论！');
		document.location.href='/shop_signin.html';
		return false;
	}
	var s_user_type = document.getElementById('s_user_type').value;
	if( s_user_type != '2'){
		$('#quickrebottom_error').html('您不是注册会员,不能评论！');
		document.location.href='/shop_signin.html';
		return false;
	}
	var neget = document.getElementById('content_info');
	if(neget.value == '' ){
		$('#quickrebottom_error').html('请输入评论内容！');
		document.getElementById('content_info').focus();
		return false;
	}
	
	document.commentForm.submit();

}

function getnav(){

	var newsTopNav = document.getElementById('newsTopNav').value;
	$.ajax({
		type: 'POST',
		url: '/templets/html/shop/jsp/newsNav.jsp',
		data: 'cat_id=' + newsTopNav,
		success: function(msg){
			document.getElementById("newsnav").innerHTML=msg;
		}
	});
}

function getnavs(){

	var newsTopNav = document.getElementById('newsTopNav').value;
	$.ajax({
		type: 'POST',
		url: '/templets/html/shop/jsp/newsNavs.jsp',
		data: 'cat_id=' + newsTopNav,
		success: function(msg){
			document.getElementById("newsnav").innerHTML=msg;
		}
	});
}